/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author Andy
 */
@Entity(name="PackingList")
public class PackingListEntity extends DataObjectEntity implements Serializable {
    
   @OneToOne
   private ContainerEntity container;
   @OneToMany(mappedBy="packingList")
   private Collection<PackingOrderEntity> packingOrders = new ArrayList<PackingOrderEntity>();

    public PackingListEntity() {
        super();
    }

    public Collection<PackingOrderEntity> getPackingOrders() {
        return packingOrders;
    }

    public void setPackingOrders(Collection<PackingOrderEntity> packingOrders) {
        this.packingOrders = packingOrders;
    }

    public ContainerEntity getContainer() {
        return container;
    }

    public void setContainer(ContainerEntity container) {
        this.container = container;
    }

    @Override
    public String childToString() {
        return "PackingListEntity{" + "container=" + container + ", packingOrders=" + packingOrders + '}';
    }
    
}
